package com.fly.modules.sys.service;

import com.fly.common.service.TreeService;
import com.fly.modules.sys.dao.AreaDao;
import com.fly.modules.sys.entity.Area;
import com.fly.modules.sys.utils.UserUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 区域Service
 * Created by swl on 2017/4/30 0030.
 */
@Service
@Transactional(readOnly = true)
public class AreaService extends TreeService<AreaDao, Area> {

    Logger logger = LoggerFactory.getLogger(this.getClass());

    /**
     * 获取所有区域列表
     * @return
     */
    public List<Area> findAll(){
        return UserUtils.getAreaList();
    }
}
